#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = 0);
    void init();
    QPoint p_re;
    QString str;
    int qzst[40],qpst[15][15];
    ~Widget();

protected:	//mouse
    void mouseMoveEvent(QMouseEvent *event);         //移动
    void qzmove(int i,int j,int k,int flag);
    void qzredupdata(int i,int j,int k,int flag);
    void qzblackupdata(int i,int j,int k,int flag);
    void red_win();
    void black_win();
    int pd_red_j();
    int pd_black_j();
    int pd_red_che(int x,int y,int xu);
    int pd_red_ma(int x,int y,int xu);
    int pd_red_xiang(int x,int y,int xu);
    int pd_red_shi(int x,int y,int xu);
    int pd_red_shuai(int x,int y,int xu);
    int pd_red_pao(int x,int y,int xu);
    int pd_red_bin(int x,int y,int xu);
    int pd_black_che(int x,int y,int xu);
    int pd_black_ma(int x,int y,int xu);
    int pd_black_xiang(int x,int y,int xu);
    int pd_black_shi(int x,int y,int xu);
    int pd_black_shuai(int x,int y,int xu);
    int pd_black_pao(int x,int y,int xu);
    int pd_black_bin(int x,int y,int xu);

public slots:
    void all_tune();

private:
    Ui::Widget *ui;
};

#endif // WIDGET_H
